<extend file='resource/admin/base'/>

<block name="content">

    <!--	//继承-->


    <ul class="nav nav-tabs" role="tablist">
        <li class="active"><a href="#tab1">栏目首页</a></li>
        <li><a href="{{u('post')}}">栏目添加</a></li>
    </ul>
    <table class="table table-hover">
        <thead>
        <tr>
            <th>编号</th>
            <th>栏目名称</th>
            <th>操作</th>
        </tr>
        </thead>

        <tbody>
        <!--  //循环数据库的数据到页面上-->
        <foreach from="$cateData" value="$v">
            <tr>
                <!--            //编号-->
                <td>{{$v['cate_cid']}}</td>
                <!--                栏目名称-->
                <td>{{$v['cate_name']}}</td>
                <td>
                    <div class="btn-group btn-group-sm">

                        <!--                           点击编辑跳到 和添加一样对应的页面-->
                        <a href="{{u('post',['cate_cid'=>$v['cate_cid']])}}" class="btn btn-success">编辑</a>

                        <a href="{{u('del',['cate_cid'=>$v['cate_cid']])}}" class="btn btn-danger">删除</a>

                    </div>
                </td>
            </tr>

        </foreach>

        </tbody>
    </table>

    {{$cateData->links()}}
</block>
